/*
 * IOrganService.java
 *
 * Copyright 2012 the original author or authors(ninglong).
 *
 * Licensed under the org.geek.organ.service, Version 1.0 (the "License");
 *
 */
package org.geek.app.organ.service;

import java.util.List;

import org.geek.core.bean.ExtTree;
import org.geek.core.mybatis.domain.Criteria;
import org.geek.core.mybatis.domain.Organ;

/**
 * <p></p>
 * @author ninglong bhd2973@qq.com
 * @version V1.0
 */
public interface IOrganService {
	/**
	 * @return 将机构集合转换成可组成tree的对象menu
	 */
	List<ExtTree> getOrgans2Tree();
	
	/**
	 * @param criteria 查询条件
	 * @return  根据条件得到机构数量
	 */
	int countOrganByCriteria(Criteria criteria);
	
	/**
	 * @param criteria 查询条件
	 * @return 根据条件得到机构
	 */
	List<Organ> getOrganByCriteria(Criteria criteria);
	
	/**
	 * @param Organ 需要保存的机构
	 * @return
	 */
	int modOrgan(Organ organ);
	
	/**
	 * @param organ 需要保存的机构
	 * @return
	 */
	int addOrgan(Organ organ);
	
	/**
	 * @param organId 需要删除的功能机构Id
	 * @return
	 */
	int delOrganByOrganId(int organId);
}
